<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title></title>
    <link rel="shortcut icon" th:href="@{/images/favicon.ico}"/>
    <link rel="stylesheet" th:href="@{/css/css_x/centro/pintuer.css}">
    <link rel="stylesheet" th:href="@{/css/css_x/centro/admin.css}">
    <script th:src="@{/js/js_x/fondo/jquery.js}"></script>
    <script th:src="@{/js/js_x/reservation/pintuer.js}"></script>
</head>
<body>
<form method="post" th:action="@{/a/u/queryUser}">
    <div class="panel admin-panel">
        <div class="panel-head"><strong>用户列表</strong></div>
        <div class="padding border-bottom">
            <ul class="search">
                <li><input type="text" placeholder="请输入用户名查询" name="userName" class="input" style="width: 250px; line-height: 17px; display: inline-block" th:value="${keyword}"/>
                    <button type="submit" class="button border-main " >搜索</button>
                </li>
            </ul>
        </div>
        <table class="table table-hover text-center">
            <tr >
                <th >姓名</th>
                <th>公司名称</th>
                <th>电话</th>
                <th>邮箱</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            <tr th:each="user:${userList}">
                <td  th:text="${user.userName}">小明</td>
                <td  th:text="${user.company}">苏州高博</td>
                <td  th:text="${user.phoneNumber}">1557443322</td>
                <td  th:text="${user.mail}">121313121@qq.com</td>
                <td  th:text="${user.delIdent == 0 ? '已启用' : '已禁用'}">启用</td>
                <td><div class="button-group"><a class="button border-red" th:href="@{/a/u/banUser(id = ${user.id},delIdent =${user.delIdent == 0 ? 1 : 0})}" th:text="${user.delIdent == 0 ? '禁用' : '启用'}">禁用</a></div></td>
            </tr>
            <tr>
                <td colspan="8">
                    <div class="pagelist">
                        <a th:href="@{/a/u/queryUser(currentPage = 1)}">首页</a>
                        <a th:if="${currentPage gt 1}" th:href="@{/a/u/queryUser(currentPage = ${currentPage - 1})}">上一页</a>
                        <!--<span class="current">1</span>-->
                        <a th:each="page:${#numbers.sequence(1,totalPage)}" th:href="@{/a/u/queryUser(currentPage = ${page})}" th:text="${page}">1</a>
                        <a th:if="${currentPage lt totalPage}" th:href="@{/a/u/queryUser(currentPage = ${currentPage + 1})}">下一页</a>
                        <a th:href="@{/a/u/queryUser(currentPage = ${totalPage})}">尾页</a>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</form>
</body>
</html>
